package com.zyong.design.pattern.mediator.case2;

/**
 * 电视机
 * @program: zyong-design-pattern
 * @ClassName: TV
 * @author: zyong
 * @create: 2024-04-04 08:57
 */
public class Tv extends AbstractColleague {
    public Tv(Mediator mediator, String name) {
        super(mediator, name);
    }

    @Override
    public void sendMessage(int stateChange) {
        getMediator().getMessage(stateChange, name);
    }

    public void startTv() {
        System.out.println("打开电视机");
    }

    public void stopTv() {
        System.out.println("关闭电视机");
    }
}
